package scenarios.scenario2;

import main.Util;
import LBJ2.util.StudentT;


public class Cenario2_Tarefa3 {

	public static void main(String[] args) {
		
		double[] fifoGrupo1 = new double[] {
			28.0814, 28.5040, 29.3680, 30.0195, 29.2100
		};
		
		System.out.println("FIFO Grupo 1: "+prettyPrint(StudentT.confidenceInterval(fifoGrupo1, 0.1)));
		
		double[] fifoGrupo2 = new double[] {
			79.0653, 79.1117, 76.2296, 75.1463, 76.9532
		};
		
		System.out.println("FIFO Grupo 2: "+prettyPrint(StudentT.confidenceInterval(fifoGrupo2, 0.1)));
		
		double[] redGrupo1 = new double[] {
			21.414, 21.2653, 21.4188, 21.1925, 21.9861
		};
		
		System.out.println("RED Grupo 1: "+prettyPrint(StudentT.confidenceInterval(redGrupo1, 0.1)));
			
		double[] redGrupo2 = new double[] {
			43.8496, 43.3828, 42.8973, 41.9240, 42.9425
		};
		
		System.out.println("RED Grupo 2: "+prettyPrint(StudentT.confidenceInterval(redGrupo2, 0.1)));
	}
	
	private static String prettyPrint(double[] ic) {
		return "["+Util.prettyPrint(ic[0]-ic[1])+"; "+Util.prettyPrint(ic[0]+ic[1])+"]";
	}
}
